package asteroids.model.programs.statements;

import asteroids.model.programs.Program;
import exception.StopActionClassException;

public class FireStatement extends ActionStatement {
	
	public FireStatement(){
	}
	
	public void execute(Program program) throws StopActionClassException{
		if(!isExecuted()){
		try{
		program.getShip().fireBullet();
		setExecuted();
		}
		catch(Exception e){
		}

		throw new StopActionClassException(this);
		}
	}

	

}
